# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>
# Contributor: Ben Booth <benwbooth@gmail.com>

pkgname=perl-text-soundex
pkgver=3.05
pkgrel=10
pkgdesc='Implementation of the soundex algorithm'
arch=('loong64' 'x86_64')
url="https://metacpan.org/release/Text-Soundex"
license=('GPL' 'PerlArtistic')
depends=(perl)
options=('!emptydirs' purge)
source=("https://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Text-Soundex-$pkgver.tar.gz")
md5sums=('cb40ded7a5d27aa3a411d274d6ec18ae')

build() (
  cd "$srcdir/Text-Soundex-$pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  /usr/bin/perl Makefile.PL
  make
)

check() (
  cd "$srcdir/Text-Soundex-$pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  export PERL_MM_USE_DEFAULT=1
  make test
)

package() (
  cd "$srcdir/Text-Soundex-$pkgver"
  unset PERL5LIB PERL_MM_OPT PERL_LOCAL_LIB_ROOT
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)
